package com.xymtop.api.implement;

import com.xymtop.api.entity.User;
import com.xymtop.api.mapper.UserMapper;
import com.xymtop.api.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public int add(User user){
        return userMapper.add(user);
    }

    @Override
    public int delete(String id) {
        return userMapper.delete(id);
    }

    @Override
    public int changPhone(String id,  String phone) {
        return userMapper.changPhone(id,phone);
    }

    @Override
    public int changPassword(String id,  String password) {
        return userMapper.changPassword(id,password);
    }



    @Override
    public List<User> getList(String id,String password) {
        return userMapper.getList(id,password);
    }

    @Override
    public User getUserById(String id) {
        return userMapper.getUserById(id);
    }


}
